/**
 * 验证码
 * Created by yong_pliang on 15/8/13.
 */
var base = require('./Base');
var ObjectId = base.ObjectId;

var VerificationCodeSchema  =new base.Schema({
    mobile:String,//手机号
    ascii:String,
    hex:String,
    base32:String,//验证码
    otpauth_url:String,
    uid:ObjectId//注册成功则记录关联的用户账户ID
});
VerificationCodeSchema.index({mobile:1,uid:1},{"background" : true});//设置索引
var VerificationCodeEntity = base.mongoose.model('VerificationCodeEntity',VerificationCodeSchema,'verificationcode');
exports.VerificationCodeEntity  = VerificationCodeEntity;